home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 23
/
AACD 23.iso
/
AACD
/
Online
/
FlushHeaders
/
new-source
/
NewSource.lha
/
str.c
< prev
Wrap
C/C++ Source or Header
|
2001-06-10
|
2KB
|
76 lines
//#include "Yam2NN.h"
/*
** YAM2NN - Usenet access for YAM p7 and newer
** Copyright (C) 1999 Karol Bryd <kbryd@femina.com.pl>
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <proto/dos.h>
#ifndef __SASC
char *Stptok(const char *s, char *tok, int toklen, const char *brk)
{
int pos;
if((s == NULL) || (tok == NULL) || (brk == NULL))
return(NULL);
if(*s == 0)
return(NULL);
pos = 0;
while(1)
{
if(*s == 0)
break;
if(strchr(brk, *s))
break;
tok[pos++] = *s;
if(pos >= toklen)
break;
s++;
}
tok[pos] = 0;
return(s);
}
char *Stpblk(const char *str)
{
while(isspace(*str) && *str)
str++;
return(str);
}
int Astcsma(char *s, char *p)
{
char out[255];
if(ParsePatternNoCase(p, out, sizeof(out)) > 0)
if(MatchPatternNoCase(out, s))
return(TRUE);
return(FALSE);
}
#endif